#ifndef GRAPHLETSMANAGER_H
#define GRAPHLETSMANAGER_H
#include <QList>
#include <QMutex>
#include "graphlets.h"
#include "../corelibglobal.h"
class CORELIB_EXPORT GraphletsManager
{
public:
    static GraphletsManager *instance();
    void loadGraphlets(QString graphFileUrl);//加载图元文件
    QList<Graphlets> getGraphletsList();//获取所有的图元列表
    void addGraphlets(Graphlets graphlets);
    void removeGraphlets(QString gGuid);//依据guid删除图元
    Graphlets getGraphlets(QString gGuid);//依据guid获取图元
private:
    GraphletsManager();
    QString loadGraphletsXml(QString fileName);
private:
    static QMutex m_mutex;
    QList<Graphlets> m_gList;

};

#endif // GRAPHLETSMANAGER_H
